package com.yang.qgg_demo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yang.qgg_demo.entity.Bill;
import com.yang.qgg_demo.mapper.BillMapper;
import com.yang.qgg_demo.service.BillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements BillService {

    @Autowired
    private BillMapper billMapper;

    public List<Map<String, Object>> getTotalMoneyByDate() {
        return billMapper.findTotalMoneyByDate();
    }

    public Integer addBill() {
        return billMapper.findTotalMoney();
    }

    public Integer addprofit() {
        return billMapper.findprofit();
    }
}
